package com.ccb.sc.member.convert;

import com.ccb.sc.member.vo.ReceiverCreateVo;
import com.ccb.sc.member.vo.ReceiverVo;
import com.ccb.sc.common.modules.member.entity.Receiver;
import org.mapstruct.Mapper;

import java.util.List;

import static org.mapstruct.factory.Mappers.getMapper;

/**
 * @author ken
 * @version 1.0
 * @date 2020-09-16
 */
@Mapper
public interface ReceiverConvert {

    ReceiverConvert INSTANCE = getMapper(ReceiverConvert.class);

    List<ReceiverVo> entity2ListItemBatch(List<Receiver> list);

    /**
     * 实体转vo
     * @param entity 实体
     * @return vo
     */
    ReceiverVo entityToVo(Receiver entity);

    Receiver createParam2Entity(ReceiverCreateVo createVo);

    Receiver updateParam2Entity(ReceiverVo updateVo);
}
